import { ComponentStyle, DiyComponent } from '@/components/DiyEditor/util'

/** 用户卡片属性 */
export interface UserCardProperty {
  showVip: boolean
  showTask: boolean
  showLogout: boolean
  showShare: boolean
  showBindPhone: boolean
  shareIcon: string
  logoutIcon: string
  taskIcon: string
  // 查看详情按钮是否显示
  showViewDetails: boolean
  // 查看详情图标
  viewDetailsIcon: string
  // 组件样式
  style: ComponentStyle
}

// 定义组件
export const component = {
  id: 'UserCard',
  name: '用户卡片',
  icon: 'ep:avatar',
  property: {
    showVip: true,
    showTask: true,
    showLogout: true,
    showShare: true,
    showBindPhone: true,
    shareIcon: '',
    logoutIcon: '',
    taskIcon: '',
    showViewDetails: true,
    viewDetailsIcon: '',
    style: {
      bgType: 'color',
      bgColor: '',
      marginBottom: 8
    } as ComponentStyle
  }
} as DiyComponent<UserCardProperty>
